//要查找DOM树的某个节点，需要从document对象开始查找。最常用的查找是根据ID和Tag Name。

//例子1
'use strict'
document.title="如何能学好javaScript！！！";
console.log(document.title);


//例子2
var menu = document.getElementById('drink-menu');

var drinks = document.getElementsByTagName('dt');
console.log(drinks);
var i, s;

s = '提供的饮料有:';
for (i=0; i<drinks.length; i++) {
    s = s + drinks[i].innerText + ',';
}
console.log(s);

var a=document.cookie;
console.log( a.length);
console.log(typeof a);
function fun1() {
   var b= document.getElementById("p1")
   b.innerText=2*7;
}

function fun() {
    history.back();
}


